package designpattern.demo.j2ee.servicelocatorpattern;

import designpattern.demo.j2ee.servicelocatorpattern.locator.ServiceLocator;
import designpattern.demo.j2ee.servicelocatorpattern.service.Service;

public class Main {
    public static void main(String[] args) {
        Service service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
        service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
    }
}
